package inheritance;
import utils.*;

public class Car {
	static public void main(String[] args){
		Nissan c1 = new Nissan(11111, "March");
		Utils.println("id="+c1.id);
		Utils.println("name="+c1.name);
	}
}

class CarA{
	int id;
	String name;
	
	CarA(){
		this.name = "No name";
		Utils.println("This`s CarA");
	}
}

class Nissan extends CarA{
	Nissan(){
		Utils.println("This`s Nissan");
	}
	Nissan(String name){
		this.name = name;
		Utils.println("This`s Nissan");
	}
	Nissan(int id, String name){
		this.id = id;
		this.name = name;
		Utils.println("This`s Nissan");
	}
}

class Toyota extends CarA{
	Toyota(){
		Utils.println("This`s Toyota");
	}
}
